package com.qdlc.p2p.biz.executer.impl;

import org.springframework.beans.factory.config.ConfigurableBeanFactory;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;

import com.qdlc.p2p.biz.executer.BaseExecuter;
import com.qdlc.p2p.biz.service.RateInterestService;
import com.qdlc.p2p.common.util.BeanUtil;

/**
 * 加息利息获取
 *
 * @author ylx
 * @version 2.0
 * @date 2015年6月6日 下午5:30:20
 */
@Service
@Scope(value=ConfigurableBeanFactory.SCOPE_PROTOTYPE)
public class UpRateCollectionExecuter extends BaseExecuter {
    @Override
    public void prepare() {
    }

    /**
     * 根据borrowCollectionId获取用户加息利息
     *
     * @param collectionId
     * @return
     */
    public double getUpRateInterestByCollectionId(long collectionId) {
        RateInterestService rateInterestService = (RateInterestService) BeanUtil.getBean("rateInterestService");
        return rateInterestService.getUpRateInterestByCollectionId(collectionId);
    }
}
